<?php

namespace common\models;

use Yii;

/**
 * 短信发送
 */
class Sms
{
    public static function sendAuthCode($mobile,$code){
        $account = 'C19105836';
        $password = '23521b87c9eada903d89485bad43e2d2';
        $mobile;
        $content = "您的验证码是：".$code."。请不要把验证码泄露给其他人。";
        
        $jsonarr = ['account='.$account,'password='.$password,'mobile='.$mobile,'content='.$content];
        $str = implode("&", $jsonarr);
            
        return Tools::curl_get('http://106.ihuyi.com/webservice/sms.php?method=Submit&'.$str);
    }
}
